package cn.kent.strategyPattern;

/**
 * 赵云，策略执行者
 *
 * @author kent
 * @date 2021/5/8 9:51
 */
public class ZhaoYun {

    /**
     * 赵云出场，按照小亮指示，依次拆开锦囊
     */
    public static void main(String[] args) {
        Context context;
        System.out.println("刚到吴国开第一个====");
        // 拿到妙计
        context= new Context(new BackDoor());
        context.operate();
        System.out.println("第一个执行结束\n\n\n\n\n\n");

        System.out.println("刘总管乐不思蜀，开第二个=====");
        context = new Context(new GivenGreenLight());
        context.operate();
        System.out.println("第二个执行结束\n\n\n\n\n\n");

        System.out.println("刘总管被孙权小兵追击，开第三个=====");
        context = new Context(new BlockEnemy());
        context.operate();
        System.out.println("第三个执行结束\n\n\n\n\n\n");
    }
}
